<?php
class category_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
        
    }
    
    function get($id)
    {
        $query = $this->db->query("
            SELECT * 
            FROM `dtb_category` 
            WHERE `delete` is null
                AND (`status`='Public' or `status`='true')
                AND `id`='$id'
        ");
        return $query->result();
    }
    function gets()
    {
        $query = $this->db->query("
            SELECT * 
            FROM `dtb_category` 
            WHERE `delete` is null
                AND (`status`='Public' or `status`='true')
        ");
        return $query->result();
    }
}
?>
